// $codepro.audit.disable
package edu.gatech.coc.betameisters.test;

import java.io.IOException;
import java.util.Calendar;
import java.util.GregorianCalendar;

import edu.gatech.coc.betameisters.infoholders.Appointment;
import edu.gatech.coc.betameisters.people.Nurse;
import edu.gatech.coc.betameisters.people.Patient;

public class AppointmentTester {
	public static void main(String[] args) throws IOException {
		final Patient pat = new Patient("Jim", "Bob");
		pat.setUserID("Bob");
		final Nurse nur = new Nurse("Betty", "Nurse");
		nur.setUserID("Betty");

		final Calendar start = new GregorianCalendar(2010, 3, 6, 10, 0);
		final Calendar end = new GregorianCalendar(2010, 3, 6, 11, 0);

		String desc = "Getting teeth pulled";

		final Appointment a = new Appointment(pat, nur, start, end, desc);

		System.out.println("completed");
		System.out.println(a.getId());

		final Patient pat2 = new Patient("Other", "Guy");
		pat2.setUserID("OtherGuy");

		// change the patient
		a.setPatient(pat2);

		// update the patient from Bob to OtherGuy
		a.update();
	}
}
